import 'package:flutter/material.dart';
import 'package:honeypotflutter/publicBussine/bussine_colors.dart';
import 'package:honeypotflutter/publicBussine/bussine_font.dart';
import 'package:honeypotflutter/publicBussine/bussine_image.dart';

class CabinetListHeader extends StatelessWidget {
  final String deviceID;
  final String deviceName;
  final bool showBottom;
  const CabinetListHeader({super.key, required this.deviceID, required this.deviceName, this.showBottom = true});

  @override
  Widget build(BuildContext context) {
    return Container(
      decoration: BoxDecoration(
          border: Border(
              bottom: BorderSide(
        color: MGColors.splitColor,
        width: showBottom ? 1 : 0,
      ))),
      padding: EdgeInsets.only(bottom: 20),
      child: Row(
        children: [
          Image.asset(MGImage.image("cabinet_icons", type: ImagePathType.cabinet), width: 55),
          SizedBox(width: 12),
          Column(
            children: [
              Text(deviceID,
                  style: TextStyle(
                    fontSize: MGFont.textFont1,
                    color: MGColors.text1Color,
                    fontWeight: FontWeight.bold,
                  )),
              SizedBox(height: 8),
              Text(deviceName,
                  style: TextStyle(
                    fontSize: MGFont.textFont2,
                    color: MGColors.text2Color,
                  )),
            ],
            crossAxisAlignment: CrossAxisAlignment.start,
          )
        ],
      ),
    );
  }
}
